//
//  TPProgressHUD.h
//  TPProgressHUDDemo
//
//  Created by 谭鹏 on 2017/7/20.
//  Copyright © 2017年 谭鹏. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger , TPProgressHUD_mainViewType){
    //通用位置
    TPProgressHUD_mainViewType_top,
    TPProgressHUD_mainViewType_center,
    TPProgressHUD_mainViewType_buttom,
    //具体frame
    TPProgressHUD_frame_toast,//toast
    TPProgressHUD_frame_hud,//
    TPProgressHUD_frame_APN,//推送
};
typedef NS_ENUM(NSUInteger ,TPProgressHUD_iconViewType) {
    TPProgressHUD_iconViewType_none,
    TPProgressHUD_iconViewType_warning,
    TPProgressHUD_iconViewType_error,
    TPProgressHUD_iconViewType_sucess,
};

//action block
typedef BOOL(^WillDismissTPProgressHUDTapBgViewBlock)();/**> bgview */
typedef BOOL(^WillDismissTPProgressHUDTapBtnBlock)(UIButton * btn);/**> btn */
    //确定，取消常用按钮
    typedef BOOL(^WillDismissTPProgressHUDTapBtnOkBlock)();/**> ok */
    typedef BOOL(^WillDismissTPProgressHUDTapBtnCancelBlock)();/**> cancel */
    typedef BOOL(^WillDismissTPProgressHUDTapBtnOtherBlock)();/**> other */

@interface TPProgressHUD : UIView
//action blcok
@property (nonatomic , strong) WillDismissTPProgressHUDTapBgViewBlock      willDismissAlertViewTapBgViewBlock;
@property (nonatomic , strong) WillDismissTPProgressHUDTapBtnBlock         willDismissAlertViewTapBtnBlock;
    @property (nonatomic , strong) WillDismissTPProgressHUDTapBtnOkBlock       willDismissAlertViewTapBtnOkBlock;
    @property (nonatomic , strong) WillDismissTPProgressHUDTapBtnCancelBlock   willDismissAlertViewTapBtnCancelBlock;
    @property (nonatomic , strong) WillDismissTPProgressHUDTapBtnOtherBlock    willDismissAlertViewTapBtnOtherBlock;




- (instancetype)initWithString:(NSString*)string iconViewType:(TPProgressHUD_iconViewType)iconViewType ;
- (instancetype)initWithString:(NSString*)string iconViewType:(TPProgressHUD_iconViewType)iconViewType cancelBtnTitle:(NSString *)cancelBtnTitle okBtnTitle:(NSString *)okBtnTitle  otherBtnTitles:(NSArray<NSString *> *)otherTitles isVertical:(BOOL)isVertical;
- (instancetype)initWithString:(NSString*)string iconViewType:(TPProgressHUD_iconViewType)iconViewType cancelBtnAttrTitle:(NSAttributedString *)cancelBtnAttrTitle okBtnAttrTitle:(NSAttributedString *)okBtnAttrTitle  otherBtnAttrTitles:(NSMutableArray<NSMutableAttributedString *> *)otherAttrTitles isVertical:(BOOL)isVertical;
- (instancetype)initLoading;
- (void)presentWithAnimated:(BOOL)animated;
- (void)dismissWithAnimated:(BOOL)animated;
@end
